package net.neptech.service;

import net.neptech.dto.workflow.UserQueryDto;
import net.neptech.model.dto.*;
import net.neptech.model.sys.Dept;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

public interface RemoteService {
    List<String> loadRoleIdListByUserId(String userId);

    List<Dept> queryDeptList(List<String> deptIdList);

    void saveMessage(MessageDto messageDto);

    List<String> queryUserIdsByRoleIds(List<Long> roleIdList);

    List<String> queryUserIdsByRoleIdsAndDeptIds(UserQueryDto userQueryDto);

    @Transactional
    void saveCC(InstanceCopyDto copyDto);

    Boolean checkIsAllParent(CheckParentDto checkParentDto);

    List<String> queryUserIdListByDepIdList(List<Long> deptIdList);

    Boolean checkIsAllChild(CheckChildDto checkChildDto);

    Map<String, Object> queryUserAllInfo(String userId);

    List<Dept> queryParentDeptList(Long deptId);

    Map<String, List<Dept>> batchQueryChildDeptList(List<Long> deptIdList);

    void startNodeEvent(InstanceNodeRecordParamDto recordParamDto);

    void processStartEvent(InstanceRecordParamDto instanceRecordParamDto);

    void endNodeEvent(InstanceNodeRecordParamDto recordParamDto);

    @Transactional
    void cancelNodeEvent(InstanceNodeRecordParamDto recordParamDto);

    void createTaskEvent(InstanceAssignUserRecordParamDto processInstanceAssignUserRecordParamDto);

    void taskCompletedEvent(InstanceAssignUserRecordParamDto processInstanceAssignUserRecordParamDto);

    void taskEndEvent(InstanceAssignUserRecordParamDto processInstanceAssignUserRecordParamDto);

    void processEndEvent(InstanceParamDto processInstanceParamDto);

    String queryProcessAdmin(String flowId);

    WorkflowDTO queryProcess(String flowId);

    void saveNodeData(NodeDataDto nodeDataDto);

    String getNodeData(String flowId, String nodeId);

    void saveExecution(InstanceExecutionDto instanceExecutionDto);
}
